MultiJava: Modular Symmetric Multiple Dispatch and Extensible Classes for Java

نویسندگان

  • Curtis Clifton
  • Gary T. Leavens
  • Craig Chambers
  • Todd Millstein
چکیده

Multiple dispatch offers several well-known advantages over the single dispatching of conventional object-oriented languages, including a simple solution to the “binary method” problem and cleaner implementations of the “strategy” and similar design patterns. Extensible classes allow one to extend the set of methods that an existing class supports without editing that class or client code. This provides, among other idioms, a simple implementation of the “visitor” design pattern. We present MultiJava, a backwardcompatible extension to Java supporting symmetric multiple dispatch and extensible classes. We adapt previous theoretical work to allow MultiJava classes to be statically typechecked modularly and safely, ruling out any link-time or run-time type errors. We also present a novel compilation scheme that operates modularly and incurs performance overhead only where multiple dispatching or extensible classes are actually used.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

MultiJava: Design, implementation, and evaluation of a Java-compatible language supporting modular open classes and symmetric multiple dispatch

This paper describes the design, implementation, and evaluation of MultiJava, a backward-compatible extension to The Java Programming Language� that supports open classes and symmetric multiple dispatch. An open class is one to which new methods can be added without editing the class directly. Multiple dispatch allows the method invoked by a message send to depend on the run-time types of any s...

متن کامل

Frontal Solutions: an Information Technology Transfer to Abstract Mathematics

1. Clifton, C., G. Leavens, C. Chambers, T. Millstein, 2000. MultiJava: Modular Open Classes and Symmetric Multiple Dispatch for Java. OOPSLA’00, Minneapolis, Minnesota, October 2000, ACM Press, New York, 130-145. http://www.cs.iastate.edu/~cclifton/multijava/papers/TR00-06.pdf 2. Findler, R., M. Flatt, 1999. Modular Object-Oriented Programming with Units and Mixins. ACM SIGPLAN International C...

متن کامل

The Runabout

This paper presents a variation of the visitor pattern which allows programmers to write visitor-like code in a concise way. The Runabout is a library extension that adds a limited form of multi-dispatch to Java. While the Runabout is not as expressive as a general multiple dispatching facility, the Runabout can be significantly faster than existing implementations of multiple dispatch for Java...

متن کامل

Parameterized Modules for Classes and Extensible Functions

We present F(Eml), a language that combines classes, extensible functions, symmetric multiple dispatching, and a practical system for parameterized modules. Parameterized modules permit subclasses and function extensions to be defined and typechecked once, and then reused to extend multiple argument modules. F(Eml)’s predecessor, Eml, supported classes and extensible functions with multiple dis...

متن کامل

Modularly Typesafe Interface Dispatch in JPred

Multiple dispatch generalizes the receiver-oriented dynamic dispatch of traditional object-oriented (OO) languages by allowing the run-time classes of all arguments to be employed. While research over the last decade has shown how to integrate multiple dispatch with the modular static typechecking found in traditional OO languages, that work has been forced to impose unnatural restrictions or m...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2000